<?php
namespace app\index\validate;


use think\Validate;

class Register extends Validate
{
    protected $rule = [
        'email'     =>  'require|email|unique:qi_user',
        'password'  =>  'require|length:4,25',
        'captcha'   =>  'require|captcha',
        '__token__' =>  'token',
    ];

    protected $message = [
        'email.require'     =>  '邮箱不能为空',
        'email.email'       =>  '邮箱格式错误',
        'email.unique'      =>  '邮箱已存在',
        'password.require'  =>  '密码不能为空',
        'password.length'   =>  '密码长度不符, 4-25个字符',
        'captcha.require'   =>  '验证码不能为空',
        'captcha.captcha'   =>  '验证码错误',
    ];
}